tests: remove byte-identical duplicate test cases - #9051
Open
aymuos15 wants to merge 2 commits into
Open
Conversation
Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (5)
📝 WalkthroughWalkthroughThe changes remove duplicate or unused test cases from federated learning, inferer, spatial transform, and image-loading test modules. Removed cases are also deleted from their parameterized test collections. Remaining test coverage and test behavior are unchanged. Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Test-suite cleanup: removes parametrized test cases that are byte-identical duplicates of
another case in the same file, so each was silently running the same test twice. Follows
the earlier byte-identical-entry pass (#8942) with a focus on duplicates spread across
differently-named
TEST_CASE_*variables that feed the same@parameterized.expand.Changes, per file (duplicate → surviving twin):
tests/transforms/test_load_image.py— dropTEST_CASE_2(=1),TEST_CASE_4(=3),TEST_CASE_7(=6),TEST_CASE_9(=8); the twotest_*_readerexpand lists lose thecorresponding slots (7 cases → 5 and 5 → 3).
tests/transforms/spatial/test_grid_patch.py/test_grid_patchd.py— drop theTEST_CASE_4that is byte-identical toTEST_CASE_3(offset (0, 0)), and its slot inthe per-backend
TEST_NDARRAYSexpansion.tests/transforms/spatial/test_rand_grid_patch.py/test_rand_grid_patchd.py— dropTEST_CASE_3, byte-identical toTEST_CASE_0(min/max_offset 0), and its slot.tests/fl/monai_algo/test_fl_monai_algo.py— dropTEST_TRAIN_3, byte-identical toTEST_TRAIN_1; the train expand list goes from 4 cases to 3 (one full FL trainround-trip no longer runs twice).
tests/inferers/test_patch_inferer.py—TEST_CASE_ERROR_10was byte-identical toTEST_CASE_ERROR_7and never referenced by any expand list (the error testsparametrize over
_0 .. _9only). Dead code; removed.Test-only change: no production code touched, no behaviour altered — each removed case
re-ran an identical parametrization. Collected test counts before → after (identical
cases removed, coverage unchanged):
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.